home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_300
/
354_01
/
cesmouse.doc
< prev
next >
Wrap
Text File
|
1991-08-20
|
56KB
|
1,849 lines
CESMouse Tools Library
With
Complete Joystick Functions
Version 1.25 Shareware
Copyright 1989, 1991. All Rights Reserved.
John F. Jarrett
Computer Engineering Services
Post Office Box 1222
Show Low, Arizona 85901
(602) 367-8996
TABLE OF CONTENTS
Program License ................................ 1
Introduction ................................... 2
Installation ................................... 3
Compiling with Power C ......................... 4
Compiling with Quick C and MS C 6.0 ............ 5
Compiling with Turbo C ......................... 7
Compiling With Quick Basic ..................... 9
Mouse Functions ................................ 11
Example C Program For Mouse Functions .......... 20
Joysticks ...................................... 21
Joystick Functions ............................. 22
Example C Source for Joystick Functions ........ 24
Bug Report Form ................................ 25
Product Registration ........................... 26
PROGRAM LICENSE
This manual, as well as all source code and object code is
copyrighted material and is registered with the United States
Copyright Office, Copyright 1989, 1991.
You, the original purchaser, do not own this software, but
you have a non exclusive and non transferrable license to use
this software on one machine. This software is just like a
book which cannot be read by another person at the same time.
Therefore, you may use this software on only one machine, or
one node of a network and make needed back up copies for your
own archival use. Site licenses and network licenses are
available. Making copies for another person is not allowed,
and is a violation of the United States Copyright Law.
You may combine the libraries, routines, functions and header
files into your own executable computer programs that you
write, as long as no source code of the functions within this
library are released and your program is compiled and linked,
without paying any royalties whatsoever to Computer
Engineering Services.
Computer Engineering Services makes no warranty expressed or
implied of any kind as to the suitability, merchantability or
applicability of this software for any purpose. Computer
Engineering Services is not liable for any damages incurred
arrising out of the use or inability to use this software by
you, others or otherwise. Computer Engineering Services only
warrants that the magnetic media on which this software
resides is free from defects in material and workmanship for
a period of ninety days IF recorded and distributed by
Computer Engineering Services.
Any reference to Turbo C, Borland C, Quick C, MSC, MS-DOS,
MicroSoft Mouse or Quick Basic, Power C, PC-DOS, Kraft Mouse
or Econo Mouse, or others, are for reference only, and are
U.S. Registered Trademarks of; Borland International,
Microsoft Corporation, Mix Software, International Business
Machines, (IBM), and Kraft Systems Inc.
1
INTRODUCTION
Ever since learning to write programs for a computer, I
learned the value of "tools" that have assisted me in my
endeavors. Often I purchase "tools" to assist me, such as a
window tool kit, communications tool kit, graphics tool kit
and the like. There are many programmers tool kits available.
My biggest problem has been coming up with the price for some
of the tool kits and then having to purchase more functions
and routines than I really want or need.
To this end, I have had to write many of my own tool kits, or
canned functions that I can use in my day-to-day programming.
Since I have yet to see a library of only mouse functions all
by themselves, I created just that. The C.E.S. Mouse Tools
Library. This library has over fifty functions that deal only
with MicroSoft compatible mice. These functions give you
almost complete control over mouse motion and sensing in all
of your programs.
Since nearly all mice sold for IBM compatible computers
running under PC-DOS or MS-DOS are compatible with the
defacto MicroSoft Mouse Driver, almost any mouse driver and
mouse will function with these routines. However there are
some functions that will only work with the MicroSoft Mouse
Driver.
Since we are dealing with secondary (mouse) input for the
computer, the joysticks have also been a problem to program.
BASIC has joystick functions, but not C or Pascal. I have
thrown them in for C programmers, because many still play
with joysticks.
The mouse and joystick routines are written in C and are all
debugged and ready for you to use. All of the functions are
optimized for speed, not size. The functions are all designed
to be almost fool-proof so that a newcomer as well as an "old
timer" can easily integrate these functions into his or her
program.
Presently, the library is compiled for the following
compilers:
Borland Turbo C version 2.0, Turbo C++ and Borland C++
Microsoft Quick C version 1.0
MicroSoft C 6.0
Mix Power C Version 2.0
GOOD LUCK!
John F. Jarrett
Computer Engineering Services
2
INSTALLATION
Installation of the CES mouse and joystick library functions
is straight forward. The include files, cesjoy.h and
cesmouse.h should be copied into the "include" subdirectories
of MicroSoft Quick C, c 6.0 and Borland Turbo C, and the
library files, mouseqcx.lib, mousemsx.lib and mousetcx.lib,
should be placed into the "lib" subdirectories of each, and x
is the memory model of the libraries. (The ShareWare version
ONLY includes the medium memory model).
For Mix Power C, the include and library files can be placed
in the same Power C directory with all of the other files. It
may also be a good idea, if you have version 2.0 of Power C,
to compile the include, (.h) files into the .hhh header file
using the fasthdr.exe utility supplied with version 2.0.
On the distribution disk you will find in the root directory
the include files, cesjoy.h, cesmouse.h, cesmouse.bas,
cesmouse.doc, (this file), and a read.me file that includes
any last minute changes in the documentation or files
included on the disk.
There will be directories for each make or version of a
supported compiler. These directories are;
POWER_C includes libraries for version 2.0
QUICK_C includes